using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace GoogleAnalytics
{
	public static class HtmlHelperExtensions
	{
		public static void RenderGoogleAnalytics(this HtmlHelper helper,string webPropertyId)
		{
			if(!string.IsNullOrEmpty(webPropertyId))
			{
				helper.RenderAction("Index", "Default", new { Area = "GoogleAnalytics",trackingCode = webPropertyId });
			}
		}
	}
}